<?php 
get_header( ); 

$CUSTOM_PAGE = get_option('page_on_front');

/* CHECK FOR CUSTOM PAGES */
if( $CUSTOM_PAGE != 0 ){

	$page_data = get_page( $CUSTOM_PAGE );

	print '<h2 class="h2top">'.$page_data->post_title.'</h2><br />';

	print $page_data->post_content;

}else{

	/* HIDELAYOUT IS USED IN SOME TEMPLATES */
	if( !isset($GLOBALS['HIDELAYOUT']) ){
	
		if(is_home()){ 
		
			if(file_exists(FilterPath()."/wp-content/themes/shopperpress/themes/".get_option('shopperpress_theme').'/_homepage.php')){
			
				include(FilterPath()."/wp-content/themes/shopperpress/themes/".get_option('shopperpress_theme').'/_homepage.php');
			
			}else{
			
				include("_homepage.php");
			
			}
		
		}else{
		
			if(file_exists(FilterPath()."/wp-content/themes/shopperpress/themes/".get_option('shopperpress_theme').'/_gallerypage.php')){
			
				include(FilterPath()."/wp-content/themes/shopperpress/themes/".get_option('shopperpress_theme').'/_gallerypage.php');
			
			}else{
		
				include("_gallerypage.php");
		
			}
		
		}
	
	}

}
get_footer(); ?>